package dancrawler.server;

import java.util.Random;

public class RoomGenerator {

    private int xCellSize;
    private int yCellSize;
    private int type;
    private Random rgen;
    private Room[] room;

    public RoomGenerator(int xCellSize, int yCellSize, int cellAmount, int type){
        rgen=new Random(System.currentTimeMillis());
        room=new Room[cellAmount];
        //2+(rgen.nextInt(cellAmount-2)) random amount of rooms, from 2 to (amount of grid cells-2)
        this.type=type;
        this.xCellSize=xCellSize;
        this.yCellSize=yCellSize;
    }

    public void generateRooms(int amt){
        rgen=new Random(System.currentTimeMillis());
        for (int i=0;i<room.length;i++){
            room[i]=new Room(5+rgen.nextInt(xCellSize-5),5+rgen.nextInt(yCellSize-5),1,0,0);
        }
    }

    public Room[] getRooms(){
        return room;
    }

}
